Optimal heapsort algorithm

نویسندگان
چکیده

برای دانلود باید عضویت طلایی داشته باشید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Worst-case analysis of generalized heapsort algorithm revisited

In this paper we present a generalized heapsort algorithm and its worst-case complexity analysis. The weighted sum of the number of comparisons and movements has been defined as a measure of the complexity. Theoretical analysis suggests that, by this criterion, 3-heap should be optimal in the worst case, contradicting the findings of A. Paulik (Paulik, A., 1990, Worst-case analysis of a general...

متن کامل

A Variant of Heapsort with Almost Optimal Number of Comparisons

An algorithm, which asymptotically halves the number of comparisons made by the common HEAPSORT, is presented and analysed in the worst case. The number of comparisons is shown to be (n+ 1)(log(n+ 1) + log log(n+ 1) + 1.82) + O(log n) in the worst case to sort n elements, without using any extra space. QUICKSORT, which usually is referred to as the fastest in-place sorting method, uses 1.38n lo...

متن کامل

Two Constant-Factor-Optimal Realizations of Adaptive Heapsort

In this paper we introduce two efficient priority queues. For both, insert requires O(1) amortized time and extract-min O(lgn) worstcase time including at most lgn+O(1) element comparisons, where n is the number of elements stored. One priority queue is based on a weak heap (array-based) and the other on a weak queue (pointer-based). In both, the main idea is to temporarily store the inserted e...

متن کامل

Dualheap Sort Algorithm: An Inherently Parallel Generalization of Heapsort

A generalization of the heapsort algorithm is proposed. At the expense of about 50% more comparison and move operations for typical cases, the dualheap sort algorithm offers several advantages over heapsort: improved cache performance, better performance if the input happens to be already sorted, and easier parallel implementations. 1. ALGORITHM OVERVIEW A heap is an array with elements regarde...

متن کامل

The Ultimate Heapsort

A variant of Heapsort|named Ultimate Heapsort|is presented that sorts n elements in-place in (n log 2 (n + 1)) worst-case time by performing at most n log 2 n + (n) key comparisons and n log 2 n + (n) element moves. The secret behind Ultimate Heapsort is that it occasionally transforms the heap it operates with to a two-layer heap which keeps small elements at the leaves. Basically, Ultimate He...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

ژورنال

عنوان ژورنال: Theoretical Computer Science

سال: 1996

ISSN: 0304-3975

DOI: 10.1016/0304-3975(95)00233-2